package com.thb.pay.exception;

import com.thb.pay.core.exception.IBusinessException;

/**
 * @Description 支付业务异常枚举
 * @Author lucky
 * @data 2019/7/29 23:17
 */
public enum PayExceptionEnum implements IBusinessException {

    PAY_CONFIG_NOT_EXIST(3001, "pay.config.not.exist");


    /**
     * 异常代码
     */
    private int code;

    /**
     * 异常描述
     */
    private String messageKey;


    PayExceptionEnum(String messageKey) {
        this.code = 0;
        this.messageKey = messageKey;
    }


    PayExceptionEnum(Integer code, String messageKey) {
        this.code = code;
        this.messageKey = messageKey;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessageKey() {
        return messageKey;
    }
}
